let map = new Map()
let arr = [1, 2, 3]
let str = 'hello'
let fn = function () {

}
map.set(arr, 1)
map.set(str, 2)
map.set(fn, 3)
map.forEach((value, key) => {
    console.log(key, value)
})

let sys = Symbol()
let obj = { [sys]: 4, a: 1, b: 2 }
console.log(obj)
//只能遍历出字符串类型
Reflect.ownKeys(obj).forEach((key) => {
    console.log(obj[key])
})

let wm = new WeakMap()
wm.set([1,2], 3)
wm.set({a:1,b:2},4)
console.log(wm)
//WeakMap数据结构的数据不能进行遍历，没有size属性，不能记录其长度
// wm.forEach((value,key)=>{
//     console.log(key,value)
// })